package com.woniu.owner.controller;

import com.woniu.common.ResponseData;
import com.woniu.owner.service.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/community")
public class LocationAddressController {

    @Autowired
    private CommunityService communityService;

    /**
     * 获取所有小区位置信息
     *
     * @return 返回所有小区位置信息列表
     */
    @GetMapping("/locations")
    public ResponseData<?> getAllCommunityLocations(@RequestParam String telephoneNumber) {
        return communityService.getAllCommunityLocations(telephoneNumber);
    }
}
